
    <?php
		if(isset($include_bottom_bar) && $include_bottom_bar == TRUE){
			echo '</div>';
			$this->load->view('includes/bottom_bar');
		}
	?>
	<div style="height: 200px"></div>
	<div id="facebook-share"><a href="JavaScript:void(0);" onclick="shareTheTrove('<?php echo base_url(); ?>')"><img src="<?php echo base_url("/resources/frame/facebook_button.png"); ?>" title="Facebook Share" alt="Facebook Share" width="35px" height="120px"/></a></div>
	<div id="twitter-share"><a href="https://twitter.com/share?url=http://thetrove.dyndns.info/ci&text=Join me in The Trove!" target="_blank"><img src="<?php echo base_url("/resources/frame/twitter_button.png"); ?>" title="Twitter Share" alt="Twitter Share" width="35px" height="120px"/></a></div>
</body>
</html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script src="<?php echo base_url('/javascripts/google_analytics.js'); ?>"></script>
<script>
	FB.init({
		appId  	: <?php echo $appId; ?>,
		status 	: true, // check login status
		cookie 	: true, // enable cookies to allow the server to access the session
		xfbml  	: true, // parse XFBML
		logging 	: true, // enables logging
		oauth	: true,
	});
	
	function shareTheTrove(base_url)
	{
		FB.ui({
			method: 'feed',
			name: 'The Trove',
			link: 'https://www.facebook.com/apps/application.php?id=113707348738471',
			picture: base_url + 'resources/Logo.gif',
			caption: 'Join me in The Trove!',
			description: 'The Trove is a website for NUS students to give/sell their used or unwanted items to one another. Find out more at our Facebook page, or visit our website at: '+ base_url,
		},
		function(response) {
		if (response && response.post_id) {
			// Post published
			} else {
			// Post not published
			}
		});
	}
</script>
